﻿<Window x:Class="VisaCRM.Modules.Admin.Views.WhereHearView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:inf="clr-namespace:VisaCRM.Common.Helper;assembly=VisaCRM.Common"
             xmlns:infConverters="clr-namespace:VisaCRM.Common.VisaCRMConverter;assembly=VisaCRM.Common"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" Title="WhereHear" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Width="440.772" Height="351.786">
    <Window.Resources>
        <infConverters:EnumToBooleanConverter x:Key="enumToBooleanConverter"/>
    </Window.Resources>
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <DataGrid Name="grdWhereHear" Grid.Column="0" Grid.RowSpan="9" HorizontalAlignment="Center" VerticalAlignment="Top" SelectedItem="{Binding Path=.CurrentWhereHear, Mode=TwoWay}" ItemsSource="{Binding Path=AllWhereHear}" AutoGenerateColumns="False" Margin="0,0,2,0" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="WhereHear" Width="Auto" Binding="{Binding Path=WhereHearText}" />
            </DataGrid.Columns>
        </DataGrid>
        <Label HorizontalAlignment="Left" Grid.Row="0" Content="WhereHear" Background="Aquamarine" Margin="10,10,0,0" VerticalAlignment="Top" Height="27" RenderTransformOrigin="0.5,0.5" Width="74" Grid.Column="1"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="10,10,0,0" VerticalAlignment="Center" Width="120" Text="{Binding CurrentWhereHearName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }" Grid.Column="2"/>
        <Label HorizontalAlignment="Left" Grid.Row="1" Content="Visible On Website" Background="Aquamarine" Margin="10,10,0,0" VerticalAlignment="Top" Height="27" RenderTransformOrigin="0.5,0.5" Width="110" Grid.ColumnSpan="2" Grid.Column="1"/>
        <StackPanel Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
            <RadioButton Name="Yes" AutomationProperties.AutomationId="YesRadioButton" IsChecked="{Binding Path=WebsiteDecide, Mode=TwoWay, Converter={StaticResource enumToBooleanConverter}, ConverterParameter={x:Static inf:WebsiteDecide.Yes}}" Margin="0,0,15,0" HorizontalAlignment="Left" VerticalAlignment="Center">Yes</RadioButton>
            <RadioButton Name="No" AutomationProperties.AutomationId="NoRadioButton" IsChecked="{Binding Path=WebsiteDecide, Mode=TwoWay, Converter={StaticResource enumToBooleanConverter}, ConverterParameter={x:Static inf:WebsiteDecide.No}}" Margin="15,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center">No</RadioButton>
        </StackPanel>
        <Button HorizontalAlignment="Left" Content="Add New" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=AddNewCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="3"/>
        <Button HorizontalAlignment="Left" Content="Edit" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=EditCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="4"/>
        <Button HorizontalAlignment="Left" Content="Cancel" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=CancelCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="5"/>
        <Button HorizontalAlignment="Left" Content="Save" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=SaveCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="6"/>
        <Button HorizontalAlignment="Left" Content="Delete" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=DeleteCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="7"/>
        <Button HorizontalAlignment="Left" Content="Close" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=CloseCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="8"/>
    </Grid>
</Window>
